package com.bittech.ds;

import java.util.Arrays;
import java.util.Random;

/**
 * @Author: yuisama
 * @Date: 2019-07-15 16:13
 * @Description:排序算法测试
 */
public class SortTest {
    public static void main(String[] args) {
        int n = 10000;
        int[] array = generateArray(n,10);
        SortAlgorithm.selectSort(array);
        printArray(array);
    }

    private static void printArray(int[] array) {
        for (int i : array)
            System.out.print(i+"、");
    }

    private static int[] generateArray(int n,int length) {
        Random random = new Random();
        int[] arr = new int[length];
        for (int i = 0; i < length; i++) {
            arr[i] = random.nextInt(n);
        }
        return arr;
    }

    private static int[] arrCopy(int[] arr) {
        return Arrays.copyOf(arr,arr.length);
    }
}
